﻿@{
    ViewBag.Title = "PaperCreateView";
    Layout = "~/Views/Shared/_GridCommonLayout.cshtml";
}

<link href="~/Scripts/datepicker/datepicker.css" rel="stylesheet" />


<!--获取当前课程的ID-->
<input id="HiddenCourseID" type="hidden" value="@ViewBag.CourseID">

<div id="Content" style="margin-top: 40px; margin-left: 3%; margin-right: 3%">
    <!--编辑试卷基本信息-->
    <div id="FirstStep" class="smart-form">
        <!--添加标题-->
        <div class="row" style="margin-left: 3%; margin-right: 3%">
            <label class="font-md">试卷名称：</label>


            <label class="input">
                <i class="icon-append fa fa-tag"></i>
                <input id="txtbSTestName" type="text" name="txtbSTestName" placeholder="请填写本试卷的试卷名，长度不能超过200字节（100汉字）">
            </label>

        </div>
        <!-- end 添加标题-->
        <!--考核方式-->
        <div class="row" style="margin-left: 3%; margin-right: 3%; margin-top: 10px">
            <div style="float: left; margin-top: 5px;">
                <label class="font-md">考试类型：</label>
                <label>
                    <select class='input-mini center form-horizontal form-control font-md' style='width: 130px;' id="txtbIKsType">

                        <option value="1">请选考试类型</option>
                        <option value="0">--线下--</option>
                        <option value="1">--线上--</option>
                    </select>
                </label>
            </div>

            <div style="float: right; margin-top: 5px;">
                <label style="margin-top: 5px" class="font-md">考核方式：</label>

                <select class='input-mini center form-horizontal form-control font-md' style='width: 135px; float: right' id="txtbITestType">

                    <option value="1">请选考核方式</option>
                    <option value="0">--开卷--</option>
                    <option value="1">--闭卷--</option>
                </select>
            </div>
        </div>
        <!--end 考核方式-->


        <!--试卷总分-->
        <div class="row" style="margin-left: 3%; margin-right: 3%; margin-top: 10px">
            <div style="float: left">
                <label class="label font-md">试卷总分:</label>
                <label class="input">
                    <i class="icon-append fa fa-tag"></i>
                    <input id="subject" type="text" name="subject" placeholder="请输入本套试卷的总分数">
                </label>
            </div>
            <div style="float: right">
                <label class="label font-md">考试时间:</label>
                <label class="input">
                    <i class="icon-append fa fa-tag"></i>
                    <input id="subjecttime" type="text" name="subject" placeholder="请输入本套试卷的测试总时间">
                </label>
            </div>
        </div>
        <!--end  试卷总分-->


        <!--难度系数和区分度-->

        <div class="row" style="margin-left: 3%; margin-right: 3%; margin-top: 10px">
            <table style="width: 1000px;">
                <tr>
                    <td style="width: 130px">
                        <label class="font-md">难易度<label class="text-info">(10星最难)</label>:</label>

                    </td>
                    <td>
                        <div id="Hard" class="rating" style="float: left;">
                            <input type="radio" id="stars-rating-10" name="stars-rating" value="10">
                            <label for="stars-rating-10"><i class="fa fa-star"></i></label>
                            <input type="radio" id="stars-rating-9" name="stars-rating" value="9">
                            <label for="stars-rating-9"><i class="fa fa-star"></i></label>
                            <input type="radio" id="stars-rating-8" name="stars-rating" value="8">
                            <label for="stars-rating-8"><i class="fa fa-star"></i></label>
                            <input type="radio" id="stars-rating-7" name="stars-rating" value="7">
                            <label for="stars-rating-7"><i class="fa fa-star"></i></label>
                            <input type="radio" id="stars-rating-6" name="stars-rating" value="6">
                            <label for="stars-rating-6"><i class="fa fa-star"></i></label>
                            <input type="radio" id="stars-rating-5" name="stars-rating" value="5">
                            <label for="stars-rating-5"><i class="fa fa-star"></i></label>
                            <input type="radio" id="stars-rating-4" name="stars-rating" value="4">
                            <label for="stars-rating-4"><i class="fa fa-star"></i></label>
                            <input type="radio" id="stars-rating-3" name="stars-rating" value="3">
                            <label for="stars-rating-3"><i class="fa fa-star"></i></label>
                            <input type="radio" id="stars-rating-2" name="stars-rating" value="2">
                            <label for="stars-rating-2"><i class="fa fa-star"></i></label>
                            <input type="radio" id="stars-rating-1" name="stars-rating" value="1">
                            <label for="stars-rating-1"><i class="fa fa-star"></i></label>
                        </div>
                    </td>
                    <td style="width: 130px">
                        <label class="font-md">区分度<label class="text-info">(10星最优)</label>:</label>

                    </td>
                    <td>
                        <div id="Dif" class="rating" style="float: left;">
                            <input type="radio" id="stars-10" name="rating" value="10">
                            <label for="stars-10"><i class="fa fa-star"></i></label>
                            <input type="radio" id="stars-9" name="rating" value="9">
                            <label for="stars-9"><i class="fa fa-star"></i></label>
                            <input type="radio" id="stars-8" name="rating" value="8">
                            <label for="stars-8"><i class="fa fa-star"></i></label>
                            <input type="radio" id="stars-7" name="rating" value="7">
                            <label for="stars-7"><i class="fa fa-star"></i></label>
                            <input type="radio" id="stars-6" name="rating" value="6">
                            <label for="stars-6"><i class="fa fa-star"></i></label>
                            <input type="radio" id="stars-5" name="rating" value="5">
                            <label for="stars-5"><i class="fa fa-star"></i></label>
                            <input type="radio" id="stars-4" name="rating" value="4">
                            <label for="stars-4"><i class="fa fa-star"></i></label>
                            <input type="radio" id="stars-3" name="rating" value="3">
                            <label for="stars-3"><i class="fa fa-star"></i></label>
                            <input type="radio" id="stars-2" name="rating" value="2">
                            <label for="stars-2"><i class="fa fa-star"></i></label>
                            <input type="radio" id="stars-1" name="rating" value="1">
                            <label for="stars-1"><i class="fa fa-star"></i></label>
                        </div>
                    </td>

                </tr>
            </table>

        </div>

        <!--end 难度系数和区分度-->



    </div>

    <!--end编辑试卷基本信息-->

    <!--第二步，编辑策略  默认隐藏第二步 此div去掉了class 避免了button的样式冲突-->
    <div id="SecondStep" class=" " style="display: none">

        <!--组卷策略-->
        <div class="row" style="margin-left: 3%; margin-right: 3%">
            <label class="font-md">组卷策略：</label>
            <button id="AddStratgeButton" type="button" class="btn btn-labeled btn-success" style="float: right" data-bind="click:$root.AddStratgeButton"><span class="btn-label"><i class="glyphicon glyphicon-plus"></i></span>新增策略</button>
        </div>
        <!--end  组卷策略-->

        <!--组卷策略表-->
        <div class="row" style="margin-left: 3%; margin-right: 3%">
            <table class="table table-striped table-bordered table-hover checkboxs">
                <!--table head-->
                <thead>
                    <tr>
                        <th style="width: 1%; display: none"></th>
                        <!-- ko foreach: headers -->
                        <th class="center ">
                            <a href="#" data-bind="text: displayText@*, click: $root.sort*@" style="color: black"></a>
                        </th>
                        <!-- /ko -->
                        <th class="center" style="width: 60px">加括号
                        </th>

                        <th class="center" style="width: 60px">操作
                        </th>

                    </tr>
                </thead>
                <!--/table head-->
                <!--table body(Provider list)-->
                <tbody data-bind="foreach: recordSet">
                    <tr class="selectable" onclick="">
                        <td class="center" style="display: none">

                            <input type="hidden" data-bind="value: Id, attr: { id: Id }" />
                        </td>

                        <td class='center'><span data-bind='text: STitle,attr:{
                                                                        "data-pk":Id}'
                            class="STitle" data-url='/api/TestLibPaperExt/UpdateSTitle'
                            data-type='text' data-name='STitle' data-title='策略标题:'></span>

                        </td>
                        <td class='center'>
                            <span data-bind='html: $root.formatIProblemType(IProblemType),attr:{
                                                                        "data-pk":Id}'
                                class="IProblemType" data-url='/api/TestLibPaperExt/UpdateIProblemType'
                                data-type='select' data-name='IProblemType' data-title='题目类型:'
                                data-source="[{value: 1, text: '单项选择题'},{value: 2, text: '多项选择题'},{value: 3, text: '判断题'}]"></span>
                        </td>
                        <td class='center'><span data-bind='text: IScore,attr:{
                                                                        "data-pk":Id}'
                            class="IScore" data-url='/api/TestLibPaperExt/UpdateIScore'
                            data-type='text' data-name='IScore' data-title='大题分数:'></span>

                        </td>
                        <td class='center'><span data-bind='text: INum,attr:{
                                                                        "data-pk":Id}'
                            class="INum" data-url='/api/TestLibPaperExt/UpdateINum'
                            data-type='text' data-name='INum' data-title='小题数量:'></span>

                        </td>
                        <td class='center'>
                            <span data-bind='html: $root.formatBracket(IAddBracket),attr:{"data-pk":Id}'
                                class="IAddBracket" data-url='/api/TestLibPaperExt/AddBracket'
                                data-type='select' data-name='IAddBracket' data-title='加括号:'
                                data-source="[{value: 1, text: '是'},{value: 0, text: '否'}]"></span>
                        </td>

                        <td class="center">
                            <button class="btn-success" data-bind="click: $root.DeleteStrategy">
                                <i class="fa fa-times"></i>
                            </button>
                        </td>
                    </tr>
                </tbody>
                <!--/table body( Provider list)-->

            </table>
        </div>
        <!--end 组卷策略表-->

    </div>
    <!--end 第二步，编辑策略-->


</div>

<!--按钮组 页面的脚部-->
<div style="margin-left: 3%; margin-right: 3%; margin-top: 10px">
    <div style="margin-left: 3%; margin-right: 3%">
        <button id="CancelId" class="btn btn-labeled btn-danger " type="button" data-bind="click:$root.CancelStep"><span class="btn-label"><i class="glyphicon glyphicon-remove"></i></span>取消</button>
        <button id="NextId" type="button" style="float: right;" class="btn btn-success btn-labeled " data-bind="click:$root.DefaultAddPaper"><span class="btn-label"><i class="glyphicon glyphicon-chevron-right"></i></span>下一步</button>
        <button id="SubmitId" type="button" style="display: none; float: right" class="btn btn-success btn-labeled " data-bind="click:$root.SubmitModel"><span class="btn-label"><i class="glyphicon glyphicon-ok"></i></span>确定</button>
        <button id="PreId" type="button" style="display: none" data-bind="click:$root.PreStep" class="btn btn-success btn-labeled "><span class="btn-label"><i class="glyphicon glyphicon-chevron-left"></i></span>上一步</button>
    </div>


    <!--策略页的提示信息-->
    <div id="stratgeinfo" style="display:none;margin-left: 3%; margin-right: 3%; margin-top: 10px;" class="center">
        <hr />
        <span class="txt-color-green">友情提示：系统会默认为您生成两个策略，你可以根据自己的需要<label class="txt-color-red"> 点击</label> 修改策略标题、题目类型、大题分数、小题个数和是否为每一个小题加括号等</span>
    </div>
    <!--end  策略页的提示信息-->

</div>


@section script{
    <script src="~/Js/bootstrap/bootstrap.js"></script>
    <script src="~/Js/plugin/x-editable/x-editable.min.js"></script>
    <script src="~/Scripts/ueditor/ueditor.config.js"></script>
    <script src="~/Scripts/ueditor/ueditor.all.js"></script>
    <script src="~/Scripts/datepicker/bootstrap-datepicker.js"></script>
    <script src="~/Js/PaperCreate.js"></script>
    <script src="~/Scripts/jquery.validate-vsdoc.js"></script>
    <script src="~/Js/plugin/jquery-validate/jquery.validate.min.js"></script>

}
